tar xf ${DOWNLOADDIR}/coreutils-9.7.tar.xz -C ${BUILDDIR}
pushd ${BUILDDIR}/coreutils-9.7
        patch -Np1 -i ${DOWNLOADDIR}/coreutils-9.7-upstream_fix-1.patch
        patch -Np1 -i ${DOWNLOADDIR}/coreutils-9.7-i18n-1.patch

	FORCE_UNSAFE_CONFIGURE=1 \
	./configure --prefix=/usr  --build=${CROSS_HOST} --host=${CROSS_TARGET} \
				--enable-no-install-program=kill,uptime
	make ${JOBS}
	make DESTDIR=${SYSDIR}/sysroot install
	mv -v ${SYSDIR}/sysroot/usr/bin/chroot ${SYSDIR}/sysroot/usr/sbin
popd
echo '#!/bin/bash -e
qemu-loongarch64 /opt/mylaos/sysroot/usr/bin/uname "$@"' > ${SYSDIR}/cross-tools/bin/cross-uname
chmod +x ${SYSDIR}/cross-tools/bin/cross-uname
